package com.neusoft.bootssm.service;

import com.neusoft.bootssm.dao.mapper.ItemsMapper;
import com.neusoft.bootssm.domain.Items;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ItemSerice {

    @Autowired
    private ItemsMapper itemsMapper;

    public Items selectByPrimaryKey(Integer id){
        return itemsMapper.selectByPrimaryKey(id);
    }

    public int add_item(Items items)
    {
        return itemsMapper.insert(items);
    }

    public List<Items> queryAll()
    {
        return itemsMapper.queryAll();
    }
}
